package com.rd.student.jiaji.class3.wangyanbo.JulyTwelve;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
public class Eight {
    public static void main(String[] args) {
        HashMap map = new HashMap();
        ArrayList passList = new ArrayList();
        ArrayList passFailList = new ArrayList();

        int maxId = 0;
        int minId = 100;
        int sumSc = 0;
        int count = 20;
        for (int i = 1; i <= count; i++) {
            int sc = (int) (Math.random() * 101);
            ;
            map.put(i, sc);
            if (sc >= 60) passList.add(sc);
            if (sc < 60) passFailList.add(sc);
            sumSc += sc;
        }
        Collection<Integer> values = map.values();
        for (Integer value : values) {
            if (value > maxId) {
                maxId = value;
            }
            if (value < minId) {
                minId = value;
            }
        }

        System.out.println(maxId);
        System.out.println(minId);
        System.out.println(sumSc / count);
        System.out.println(passList);
        System.out.println(passFailList);
    }
}

class Score {
    int id;
    int score;

    public Score(int id, int score) {
        this.id = id;
        this.score = score;
    }

    public int getScore() {
        return score;
    }


    @Override
    public String toString() {
        return "Score{" +
                "id=" + id +
                ", score=" + score +
                '}';
    }
}
